from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By

driver=webdriver.Edge()
driver.maximize_window()
driver.get('https://www.douban.com/')
sleep(5)

#进入框架
frname=driver.find_element(By.XPATH,'//*[@id="anony-reg-new"]/div/div[1]/iframe')
driver.switch_to.frame(frname)
sleep(5)

#点击密码登录
driver.find_element(By.XPATH,'/html/body/div[1]/div[1]/ul[1]/li[2]').click()
sleep(5)

#输入账号
driver.find_element(By.ID,'username').send_keys('17733058407')
sleep(5)

#输入密码
driver.find_element(By.ID,'password').send_keys('Lcf10140910')
sleep(5)

#点击登录
driver.find_element(By.XPATH,'/html/body/div[1]/div[2]/div[1]/div[5]/a').click()
sleep(10)